"""demo URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.contrib import admin

from users import views

# urlpatterns = [
#     url(r'^        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
# admin/', admin.site.urls),
# ]

urlpatterns = [
    url(r'^admin/', admin.site.urls),

    # 测试将users子应用中的路由信息包含到项目中
    # url(r'^users/', include('users.urls')),

    # 测试只在总路由里定义路由规则
    # url(r'^users/index/$', views.index),

    # 测试在总路由里只有开始没有前缀,所有的路由信息都在子应用
    # 需要定义name namespace
    url(r'^', include('users.urls', namespace='users')),
    url(r'^', include('request_response.urls')),
    url(r'^', include('classview.urls')),

    # 模拟RESTful风格的booktest视图注册
    url(r'^', include('booktest.urls')),
]